#
# Version 2.x tests
rm -f ${TMPDIR}/tpo-sample1.gpx ${TMPDIR}/tpo-sample2.tpo
-${PNAME} -t -i tpo -f reference/track/tpo-sample1.tpo -o gpx -F ${TMPDIR}/tpo-sample1.gpx
+${PNAME} -t -i tpo2 -f reference/track/tpo-sample1.tpo -o gpx -F ${TMPDIR}/tpo-sample1.gpx
compare ${TMPDIR}/tpo-sample1.gpx reference/track/tpo-sample1.gpx
-#${PNAME} -t -i gpx -f reference/track/tpo-sample2.gpx -o tpo -F ${TMPDIR}/tpo-sample2.tpo
+#${PNAME} -t -i gpx -f reference/track/tpo-sample2.gpx -o tpo2 -F ${TMPDIR}/tpo-sample2.tpo
#bincompare ${TMPDIR}/tpo-sample2.tpo reference/track/tpo-sample2.tpo
#
# Version 3.x tests. Remove the timestamp from the generated file
# so that the compare will succeed.
rm -f ${TMPDIR}/tpo-sample3.gpx ${TMPDIR}/tpo-sample3.gpx2
-${PNAME} -t -r -w -i tpo -f reference/tpo-sample3.tpo -o gpx -F ${TMPDIR}/tpo-sample3.gpx
+${PNAME} -t -r -w -i tpo3 -f reference/tpo-sample3.tpo -o gpx -F ${TMPDIR}/tpo-sample3.gpx
# Remove the timestamp
grep -v time <${TMPDIR}/tpo-sample3.gpx >${TMPDIR}/tpo-sample3.gpx2
compare ${TMPDIR}/tpo-sample3.gpx2 reference/tpo-sample3.gpx
static char *dumpheader = NULL;
static char *output_state = NULL;
+/*
static
-arglist_t tpo_args[] = {
+arglist_t tpo2_args[] = {
{ "dumpheader", &dumpheader, "Display the file header bytes",
"0", ARGTYPE_BOOL, ARG_NOMINMAX} ,
{ "state", &output_state, "State map format to write, default=CA",
"CA", ARGTYPE_STRING, ARG_NOMINMAX} ,
ARG_TERMINATOR
};
+*/
+//
+// Note that we've disabled the write capabilites for the tpo2
+// format at present. The "testo" tests were failing on some
+// platforms and there wasn't anyone willing to work on the problem.
+// If this is fixed in the future we can go back to the tpo2_args[]
+// above.
+//
+static
+arglist_t tpo2_args[] = {
+ ARG_TERMINATOR
+};
+
+static
+arglist_t tpo3_args[] = {
+ ARG_TERMINATOR
+};
+
static FILE *tpo_file_in;
static FILE *tpo_file_out;
track_disp_all(tpo_track_hdr, tpo_track_tlr, tpo_track_disp);
}
-/* TPO format can read and write tracks only */
-ff_vecs_t tpo_vecs = {
+/* TPO 2.x format can read tracks only */
+ff_vecs_t tpo2_vecs = {
+ ff_type_file, /* ff_type_internal */
+/* { ff_cap_none | ff_cap_none, ff_cap_read | ff_cap_write, ff_cap_none | ff_cap_none }, */
+ { ff_cap_none | ff_cap_none, ff_cap_read, ff_cap_none | ff_cap_none },
+ tpo_rd_init,
+ tpo_wr_init,
+ tpo_rd_deinit,
+ tpo_wr_deinit,
+ tpo_read,
+ tpo_write,
+ NULL,
+ tpo2_args,
+ CET_CHARSET_ASCII, 0 /* CET-REVIEW */
+};
+
+/* TPO 3.x format can read waypoints/tracks/routes */
+ff_vecs_t tpo3_vecs = {
ff_type_file, /* ff_type_internal */
/* { ff_cap_none | ff_cap_none, ff_cap_read | ff_cap_write, ff_cap_none | ff_cap_none }, */
{ ff_cap_none | ff_cap_none, ff_cap_read, ff_cap_none | ff_cap_none },
tpo_read,
tpo_write,
NULL,
- tpo_args,
+ tpo3_args,
CET_CHARSET_ASCII, 0 /* CET-REVIEW */
};
+
extern ff_vecs_t tmpro_vecs;
extern ff_vecs_t tomtom_vecs;
extern ff_vecs_t tpg_vecs;
-extern ff_vecs_t tpo_vecs;
+extern ff_vecs_t tpo2_vecs;
+extern ff_vecs_t tpo3_vecs;
extern ff_vecs_t unicsv_vecs;
extern ff_vecs_t vcf_vecs;
extern ff_vecs_t vitosmt_vecs;
"tpg"
},
{
- &tpo_vecs,
- "tpo",
- "National Geographic Topo .tpo",
+ &tpo2_vecs,
+ "tpo2",
+ "National Geographic Topo 2.x .tpo",
+ "tpo"
+ },
+ {
+ &tpo3_vecs,
+ "tpo3",
+ "National Geographic Topo 3.x .tpo",
"tpo"
},
{